<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <#import "/spring.ftl" as spring>
    <title><@spring.message code="login.tip"/></title>
    <link rel="shortcut icon" href="${request.contextPath}/favicon.ico" type="image/x-icon" />
    <link href="${request.contextPath}/zhny/css/reset.css" rel="stylesheet" type="text/css">
    <link href="${request.contextPath}/zhny/css/zhuanJiaWenDa_xx.css" rel="stylesheet" type="text/css">

    <script type="text/javascript" src="${request.contextPath}/zhny/js/echarts.js"></script>

    <script src="${request.contextPath}/zhny/js/jquery.min.js"></script>
    <!--字体缩放js-->
    <script src="${request.contextPath}/zhny/js/js-style.js"></script>
    <!--end字体缩放js-->
    <!--动态特效-->
    <link href="${request.contextPath}/zhny/css/style.css" rel="stylesheet" type="text/css" />

</head>
<body >


<!--top-->

<header class="header">
    <div class="header_box clearfix">
        <div class="header_box_l">
            <p>hello,${user.username!""}，<@spring.message code="index.wel"/></p>
        </div>
        <div class="header_box_c">
            <div class="masked"><@spring.message code="login.tip"/></div>
        </div>
        <div class="header_box_r ">
            <a href="${request.contextPath}/sy/zjwd/zjwdxq.html?id=${zjwd.id}&locale=zh_CN" target="_self">中文版</a>
            <a href="${request.contextPath}/sy/zjwd/zjwdxq.html?id=${zjwd.id}&locale=en_US" target="_self">English</a>
            <a href="${request.contextPath}/sy/logout" target="_self"><@spring.message code="index.out"/></a>
        </div>
    </div>
</header>
<!--end top-->

<div class="comment">
    <div class="comment_box">
        <div class="jiao_1">
            <img src="${request.contextPath}/zhny/images/1.gif">
        </div>
        <div class="jiao_2">
            <img src="${request.contextPath}/zhny/images/1.gif">
        </div>


        <div class="wenda_x">
            <div class="li_title clearfix">
                <h4><strong>游客问：</strong>${zjwd.wttitle}</h4>
                <span>${zjwd.createtime?string("yyyy-MM-dd")}</span>
            </div>
            <div class="jieDa">
                <p>${zjwd.zjanswer}</p>
                <span><@spring.message code="zjwd.hfzj"/>：${zjwd.zjname}</span>
            </div>
            <span id = "zjId" hidden>${zjwd.id}</span>
        </div>


    </div>



</div>
<!--nav-->
<div class="container">
    <section>
        <!--<button  onclick="window.location.href='${request.contextPath}/sy/index/indexnew.html'"  class="btn btn-green btn-border-o">首页</button>
        <button onclick="window.location.href='${request.contextPath}/sy/nydsj/nydsjnew.html'" class="btn btn-blue btn-border-o">数据检测</button>
        <button onclick="window.location.href='${request.contextPath}/sy/zlzs/zlzsnew.html'" class="btn btn-purple btn-border-o">质量追溯</button>
        <button onclick="window.location.href='${request.contextPath}/sy/zjwd/zjwdnew.html'" class="btn btn-red  btn-border-o  active4">专家指导</button>
        <button onclick="window.location.href='${request.contextPath}/sy/nybk/nybknew.html'" class="btn btn-orange btn-border-o">农业百科</button>
-->
        <#if isAdmn == "TRUE">
        <button  onclick="shouye()"  class="btn btn-green btn-border-o "><@spring.message code="index.sy"/></button>
    </#if>
    <button onclick="nydsj()" class="btn btn-blue btn-border-o"><@spring.message code="index.sjjc"/></button>
    <button onclick="zlzs()" class="btn btn-purple btn-border-o "><@spring.message code="index.zlzs"/></button>
    <button onclick="zjzd()" class="btn btn-red  btn-border-o active4"><@spring.message code="index.zjzd"/></button>
    <button onclick="nybk()" class="btn btn-orange btn-border-o "><@spring.message code="index.nybk"/></button>
    </section>
</div>
<script type="text/javascript">

    $(".title").css("line-height",$(".title").height() + 'px')
    $(window).resize(function(){
        $(".title").css("line-height",$(".title").height() + 'px')
    })

</script>

<script type="text/javascript">
    var locale="";
    window.onload = function(){
        var req = new XMLHttpRequest();
        req.open('GET', document.location, false);
        req.send(null);
        var headers = req.getAllResponseHeaders();
        locale=req.getResponseHeader('content-language');
        if(locale=="en-US"){
            locale="en_US";
        }else{
            locale="zh_CN";
        }
    }

    function zlzs(){
        window.location.href="${request.contextPath}/sy/zlzs/zlzsnew.html?locale="+locale;
    }
    function shouye(){
        window.location.href="${request.contextPath}/sy/index/indexnew.html?locale="+locale;
    }
    function zjzd(){
        window.location.href="${request.contextPath}/sy/zjwd/zjwdnew.html?locale="+locale;
    }
    function nybk(){
        window.location.href="${request.contextPath}/sy/nybk/nybknew.html?locale="+locale;
    }
    function nydsj(){
        window.location.href="${request.contextPath}/sy/nydsj/nydsjnew.html?locale="+locale;
    }
    $(document).ready(function () {
        var id =  document.getElementById("zjId").innerText;
        console.log(id);
       /* alert(id);
        session.setAttribute("id",id);*/
    });
    /*$(document).ready(function () {
        var id =  document.getElementById("zjId").innerText;
        console.log(id);
        /!*alert(id);*!/
        var container =$('.header_box_r');
        var dataHtml="" ;
        dataHtml += '<a href="'
        +'${request.contextPath}/sy/zjwd/zjwdxq.html?id='+id
        +'&locale=zh_CN" target="_self">中文版</a>'
        +'<a href="'
        +'${request.contextPath}/sy/zjwd/zjwdxq.html?id='+id
        +'&locale=en_US" target="_self">English</a>'
        +'<a href="'
        +'${request.contextPath}/sy/logout"'
        +' target="_self"><@spring.message code="index.out"/></a>'
    });*/
</script>

</body>
</html>
